package com.newlink.building.record.mvp.contract

import com.newlink.building.common_base.base.IModel
import com.newlink.building.common_base.base.IPresenter
import com.newlink.building.common_base.base.IView
import com.newlink.building.common_base.model.bean.HttpResult
import com.newlink.building.common_base.model.bean.OpenDoorRecordData
import com.newlink.building.common_base.model.bean.OpenDoorRecordListData
import io.reactivex.Observable

/**
 * @author wangyang
 * @date 2022/9/29
 * @description 记录-开门记录页面的Contract
 */
interface Module_Record_OpenDoorRecordContract {

    interface Model : IModel {
        fun getOpenDoorRecordList(
            token: String,
            page: Int,
            limit: Int,
        ): Observable<HttpResult<OpenDoorRecordData>>
    }

    interface View : IView {
        fun getOpenDoorRecordListSuccess(total: Int, list: MutableList<OpenDoorRecordListData>?)
        fun getOpenDoorRecordListFail()
    }

    interface Presenter : IPresenter<View> {
        fun getOpenDoorRecordList(
            token: String,
            page: Int,
            limit: Int,
        )
    }
}